﻿using System;
using System.Threading.Tasks;
using Demo.OrderManager.Orders.Dto;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace Demo.OrderManager.Orders;

/// <summary>
/// 订单应用服务接口
/// </summary>
public interface IOrderAppService : IApplicationService
{
    /// <summary>
    /// 创建订单
    /// </summary>
    /// <param name="input">订单对象</param>
    /// <returns></returns>
    Task<OrderDto> CreateAsync(OrderCreateDto input);

    /// <summary>
    /// 删除订单
    /// </summary>
    /// <param name="orderId">订单编号</param>
    /// <returns></returns>
    Task<bool> DeleteAsync(Guid orderId);

    /// <summary>
    /// 分页获取订单列表
    /// </summary>
    /// <param name="input">分页条件</param>
    /// <returns></returns>
    Task<PagedResultDto<OrderDto>> GetListAsync(PagedAndSortedResultRequestDto input);

    /// <summary>
    /// 依据订单编号获取订单详情
    /// </summary>
    /// <param name="id">订单编号</param>
    /// <returns></returns>
    Task<OrderDetailDto> GetAsync(Guid id);
}